3.19 \(\int \frac {(a+b \sec ^{-1}(c x))^2}{x} \, dx\)

Optimal. Leaf size=93 \[ i b \text {Li}_2\left (-e^{2 i \sec ^{-1}(c x)}\right ) \left (a+b \sec ^{-1}(c x)\right )+\frac {i \left (a+b \sec ^{-1}(c x)\right )^3}{3 b}-\log \left (1+e^{2 i \sec ^{-1}(c x)}\right ) \left (a+b \sec ^{-1}(c x)\right )^2-\frac {1}{2} b^2 \text {Li}_3\left (-e^{2 i \sec ^{-1}(c x)}\right ) \]

[Out]

1/3*I*(a+b*arcsec(c*x))^3/b-(a+b*arcsec(c*x))^2*ln(1+(1/c/x+I*(1-1/c^2/x^2)^(1/2))^2)+I*b*(a+b*arcsec(c*x))*po
lylog(2,-(1/c/x+I*(1-1/c^2/x^2)^(1/2))^2)-1/2*b^2*polylog(3,-(1/c/x+I*(1-1/c^2/x^2)^(1/2))^2)

________________________________________________________________________________________

Rubi [A]  time = 0.12, antiderivative size = 93, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {5222, 3719, 2190, 2531, 2282, 6589} \[ i b \text {PolyLog}\left (2,-e^{2 i \sec ^{-1}(c x)}\right ) \left (a+b \sec ^{-1}(c x)\right )-\frac {1}{2} b^2 \text {PolyLog}\left (3,-e^{2 i \sec ^{-1}(c x)}\right )+\frac {i \left (a+b \sec ^{-1}(c x)\right )^3}{3 b}-\log \left (1+e^{2 i \sec ^{-1}(c x)}\right ) \left (a+b \sec ^{-1}(c x)\right )^2 \]

Antiderivative was successfully verified.

[In]

Int[(a + b*ArcSec[c*x])^2/x,x]

[Out]

((I/3)*(a + b*ArcSec[c*x])^3)/b - (a + b*ArcSec[c*x])^2*Log[1 + E^((2*I)*ArcSec[c*x])] + I*b*(a + b*ArcSec[c*x
])*PolyLog[2, -E^((2*I)*ArcSec[c*x])] - (b^2*PolyLog[3, -E^((2*I)*ArcSec[c*x])])/2

Rule 2190

Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/((a_) + (b_.)*((F_)^((g_.)*((e_.) +
 (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp[((c + d*x)^m*Log[1 + (b*(F^(g*(e + f*x)))^n)/a])/(b*f*g*n*Log[F]), x]
 - Dist[(d*m)/(b*f*g*n*Log[F]), Int[(c + d*x)^(m - 1)*Log[1 + (b*(F^(g*(e + f*x)))^n)/a], x], x] /; FreeQ[{F,
a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]

Rule 2282

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]

Rule 2531

Int[Log[1 + (e_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.)]*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> -Simp[((
f + g*x)^m*PolyLog[2, -(e*(F^(c*(a + b*x)))^n)])/(b*c*n*Log[F]), x] + Dist[(g*m)/(b*c*n*Log[F]), Int[(f + g*x)
^(m - 1)*PolyLog[2, -(e*(F^(c*(a + b*x)))^n)], x], x] /; FreeQ[{F, a, b, c, e, f, g, n}, x] && GtQ[m, 0]

Rule 3719

Int[((c_.) + (d_.)*(x_))^(m_.)*tan[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(I*(c + d*x)^(m + 1))/(d*(m + 1)), x
] - Dist[2*I, Int[((c + d*x)^m*E^(2*I*(e + f*x)))/(1 + E^(2*I*(e + f*x))), x], x] /; FreeQ[{c, d, e, f}, x] &&
 IGtQ[m, 0]

Rule 5222

Int[((a_.) + ArcSec[(c_.)*(x_)]*(b_.))^(n_)*(x_)^(m_.), x_Symbol] :> Dist[1/c^(m + 1), Subst[Int[(a + b*x)^n*S
ec[x]^(m + 1)*Tan[x], x], x, ArcSec[c*x]], x] /; FreeQ[{a, b, c}, x] && IntegerQ[n] && IntegerQ[m] && (GtQ[n,
0] || LtQ[m, -1])

Rule 6589

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rubi steps

\begin {align*} \int \frac {\left (a+b \sec ^{-1}(c x)\right )^2}{x} \, dx &=\operatorname {Subst}\left (\int (a+b x)^2 \tan (x) \, dx,x,\sec ^{-1}(c x)\right )\\ &=\frac {i \left (a+b \sec ^{-1}(c x)\right )^3}{3 b}-2 i \operatorname {Subst}\left (\int \frac {e^{2 i x} (a+b x)^2}{1+e^{2 i x}} \, dx,x,\sec ^{-1}(c x)\right )\\ &=\frac {i \left (a+b \sec ^{-1}(c x)\right )^3}{3 b}-\left (a+b \sec ^{-1}(c x)\right )^2 \log \left (1+e^{2 i \sec ^{-1}(c x)}\right )+(2 b) \operatorname {Subst}\left (\int (a+b x) \log \left (1+e^{2 i x}\right ) \, dx,x,\sec ^{-1}(c x)\right )\\ &=\frac {i \left (a+b \sec ^{-1}(c x)\right )^3}{3 b}-\left (a+b \sec ^{-1}(c x)\right )^2 \log \left (1+e^{2 i \sec ^{-1}(c x)}\right )+i b \left (a+b \sec ^{-1}(c x)\right ) \text {Li}_2\left (-e^{2 i \sec ^{-1}(c x)}\right )-\left (i b^2\right ) \operatorname {Subst}\left (\int \text {Li}_2\left (-e^{2 i x}\right ) \, dx,x,\sec ^{-1}(c x)\right )\\ &=\frac {i \left (a+b \sec ^{-1}(c x)\right )^3}{3 b}-\left (a+b \sec ^{-1}(c x)\right )^2 \log \left (1+e^{2 i \sec ^{-1}(c x)}\right )+i b \left (a+b \sec ^{-1}(c x)\right ) \text {Li}_2\left (-e^{2 i \sec ^{-1}(c x)}\right )-\frac {1}{2} b^2 \operatorname {Subst}\left (\int \frac {\text {Li}_2(-x)}{x} \, dx,x,e^{2 i \sec ^{-1}(c x)}\right )\\ &=\frac {i \left (a+b \sec ^{-1}(c x)\right )^3}{3 b}-\left (a+b \sec ^{-1}(c x)\right )^2 \log \left (1+e^{2 i \sec ^{-1}(c x)}\right )+i b \left (a+b \sec ^{-1}(c x)\right ) \text {Li}_2\left (-e^{2 i \sec ^{-1}(c x)}\right )-\frac {1}{2} b^2 \text {Li}_3\left (-e^{2 i \sec ^{-1}(c x)}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.13, size = 129, normalized size = 1.39 \[ a^2 \log (c x)+i b \text {Li}_2\left (-e^{2 i \sec ^{-1}(c x)}\right ) \left (a+b \sec ^{-1}(c x)\right )+i a b \sec ^{-1}(c x)^2-2 a b \sec ^{-1}(c x) \log \left (1+e^{2 i \sec ^{-1}(c x)}\right )-\frac {1}{2} b^2 \text {Li}_3\left (-e^{2 i \sec ^{-1}(c x)}\right )+\frac {1}{3} i b^2 \sec ^{-1}(c x)^3-b^2 \sec ^{-1}(c x)^2 \log \left (1+e^{2 i \sec ^{-1}(c x)}\right ) \]

Warning: Unable to verify antiderivative.

[In]

Integrate[(a + b*ArcSec[c*x])^2/x,x]

[Out]

I*a*b*ArcSec[c*x]^2 + (I/3)*b^2*ArcSec[c*x]^3 - 2*a*b*ArcSec[c*x]*Log[1 + E^((2*I)*ArcSec[c*x])] - b^2*ArcSec[
c*x]^2*Log[1 + E^((2*I)*ArcSec[c*x])] + a^2*Log[c*x] + I*b*(a + b*ArcSec[c*x])*PolyLog[2, -E^((2*I)*ArcSec[c*x
])] - (b^2*PolyLog[3, -E^((2*I)*ArcSec[c*x])])/2

________________________________________________________________________________________

fricas [F]  time = 0.41, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {b^{2} \operatorname {arcsec}\left (c x\right )^{2} + 2 \, a b \operatorname {arcsec}\left (c x\right ) + a^{2}}{x}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arcsec(c*x))^2/x,x, algorithm="fricas")

[Out]

integral((b^2*arcsec(c*x)^2 + 2*a*b*arcsec(c*x) + a^2)/x, x)

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arcsec(c*x))^2/x,x, algorithm="giac")

[Out]

Exception raised: RuntimeError >> An error occurred running a Giac command:INPUT:sage2OUTPUT:Warning, integrat
ion of abs or sign assumes constant sign by intervals (correct if the argument is real):Check [abs(x)]Evaluati
on time: 0.52ln of unsigned or minus infinity Error: Bad Argument Value

________________________________________________________________________________________

maple [A]  time = 0.22, size = 215, normalized size = 2.31 \[ a^{2} \ln \left (c x \right )+\frac {i b^{2} \mathrm {arcsec}\left (c x \right )^{3}}{3}-b^{2} \mathrm {arcsec}\left (c x \right )^{2} \ln \left (1+\left (\frac {1}{c x}+i \sqrt {1-\frac {1}{c^{2} x^{2}}}\right )^{2}\right )+i b^{2} \mathrm {arcsec}\left (c x \right ) \polylog \left (2, -\left (\frac {1}{c x}+i \sqrt {1-\frac {1}{c^{2} x^{2}}}\right )^{2}\right )-\frac {b^{2} \polylog \left (3, -\left (\frac {1}{c x}+i \sqrt {1-\frac {1}{c^{2} x^{2}}}\right )^{2}\right )}{2}+i a b \mathrm {arcsec}\left (c x \right )^{2}-2 a b \,\mathrm {arcsec}\left (c x \right ) \ln \left (1+\left (\frac {1}{c x}+i \sqrt {1-\frac {1}{c^{2} x^{2}}}\right )^{2}\right )+i a b \polylog \left (2, -\left (\frac {1}{c x}+i \sqrt {1-\frac {1}{c^{2} x^{2}}}\right )^{2}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*arcsec(c*x))^2/x,x)

[Out]

a^2*ln(c*x)+1/3*I*b^2*arcsec(c*x)^3-b^2*arcsec(c*x)^2*ln(1+(1/c/x+I*(1-1/c^2/x^2)^(1/2))^2)+I*b^2*arcsec(c*x)*
polylog(2,-(1/c/x+I*(1-1/c^2/x^2)^(1/2))^2)-1/2*b^2*polylog(3,-(1/c/x+I*(1-1/c^2/x^2)^(1/2))^2)+I*a*b*arcsec(c
*x)^2-2*a*b*arcsec(c*x)*ln(1+(1/c/x+I*(1-1/c^2/x^2)^(1/2))^2)+I*a*b*polylog(2,-(1/c/x+I*(1-1/c^2/x^2)^(1/2))^2
)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ -\frac {1}{2} \, b^{2} c^{2} {\left (\frac {\log \left (c x + 1\right )}{c^{2}} + \frac {\log \left (c x - 1\right )}{c^{2}}\right )} \log \relax (c)^{2} + b^{2} c^{2} \int \frac {x^{2} \log \left (c^{2} x^{2}\right )}{c^{2} x^{3} - x}\,{d x} \log \relax (c) - 2 \, b^{2} c^{2} \int \frac {x^{2} \log \relax (x)}{c^{2} x^{3} - x}\,{d x} \log \relax (c) + 2 \, b^{2} c^{2} \int \frac {x^{2} \log \left (c^{2} x^{2}\right ) \log \relax (x)}{c^{2} x^{3} - x}\,{d x} - b^{2} c^{2} \int \frac {x^{2} \log \relax (x)^{2}}{c^{2} x^{3} - x}\,{d x} + 2 \, a b c^{2} \int \frac {x^{2} \arctan \left (\sqrt {c x + 1} \sqrt {c x - 1}\right )}{c^{2} x^{3} - x}\,{d x} + \frac {1}{2} \, b^{2} {\left (\log \left (c x + 1\right ) + \log \left (c x - 1\right ) - 2 \, \log \relax (x)\right )} \log \relax (c)^{2} + b^{2} \arctan \left (\sqrt {c x + 1} \sqrt {c x - 1}\right )^{2} \log \relax (x) - \frac {1}{4} \, b^{2} \log \left (c^{2} x^{2}\right )^{2} \log \relax (x) - b^{2} \int \frac {\log \left (c^{2} x^{2}\right )}{c^{2} x^{3} - x}\,{d x} \log \relax (c) + 2 \, b^{2} \int \frac {\log \relax (x)}{c^{2} x^{3} - x}\,{d x} \log \relax (c) - 2 \, b^{2} \int \frac {\sqrt {c x + 1} \sqrt {c x - 1} \arctan \left (\sqrt {c x + 1} \sqrt {c x - 1}\right ) \log \relax (x)}{c^{2} x^{3} - x}\,{d x} - 2 \, b^{2} \int \frac {\log \left (c^{2} x^{2}\right ) \log \relax (x)}{c^{2} x^{3} - x}\,{d x} + b^{2} \int \frac {\log \relax (x)^{2}}{c^{2} x^{3} - x}\,{d x} - 2 \, a b \int \frac {\arctan \left (\sqrt {c x + 1} \sqrt {c x - 1}\right )}{c^{2} x^{3} - x}\,{d x} + a^{2} \log \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arcsec(c*x))^2/x,x, algorithm="maxima")

[Out]

-1/2*b^2*c^2*(log(c*x + 1)/c^2 + log(c*x - 1)/c^2)*log(c)^2 + b^2*c^2*integrate(x^2*log(c^2*x^2)/(c^2*x^3 - x)
, x)*log(c) - 2*b^2*c^2*integrate(x^2*log(x)/(c^2*x^3 - x), x)*log(c) + 2*b^2*c^2*integrate(x^2*log(c^2*x^2)*l
og(x)/(c^2*x^3 - x), x) - b^2*c^2*integrate(x^2*log(x)^2/(c^2*x^3 - x), x) + 2*a*b*c^2*integrate(x^2*arctan(sq
rt(c*x + 1)*sqrt(c*x - 1))/(c^2*x^3 - x), x) + 1/2*b^2*(log(c*x + 1) + log(c*x - 1) - 2*log(x))*log(c)^2 + b^2
*arctan(sqrt(c*x + 1)*sqrt(c*x - 1))^2*log(x) - 1/4*b^2*log(c^2*x^2)^2*log(x) - b^2*integrate(log(c^2*x^2)/(c^
2*x^3 - x), x)*log(c) + 2*b^2*integrate(log(x)/(c^2*x^3 - x), x)*log(c) - 2*b^2*integrate(sqrt(c*x + 1)*sqrt(c
*x - 1)*arctan(sqrt(c*x + 1)*sqrt(c*x - 1))*log(x)/(c^2*x^3 - x), x) - 2*b^2*integrate(log(c^2*x^2)*log(x)/(c^
2*x^3 - x), x) + b^2*integrate(log(x)^2/(c^2*x^3 - x), x) - 2*a*b*integrate(arctan(sqrt(c*x + 1)*sqrt(c*x - 1)
)/(c^2*x^3 - x), x) + a^2*log(x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {{\left (a+b\,\mathrm {acos}\left (\frac {1}{c\,x}\right )\right )}^2}{x} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*acos(1/(c*x)))^2/x,x)

[Out]

int((a + b*acos(1/(c*x)))^2/x, x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (a + b \operatorname {asec}{\left (c x \right )}\right )^{2}}{x}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*asec(c*x))**2/x,x)

[Out]

Integral((a + b*asec(c*x))**2/x, x)

________________________________________________________________________________________